-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[google_sign_in_ios] Adds Swift Package Manager support #7356
base: main
Are you sure you want to change the base?
Conversation
b359e38
to
b455e98
Compare
@@ -26,17 +26,14 @@ end | |||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | |||
|
|||
# Suppress warnings from transitive dependencies that cause analysis to fail. | |||
pod 'AppAuth', :inhibit_warnings => true | |||
pod 'GTMAppAuth', :inhibit_warnings => true | |||
inhibit_all_warnings! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines inhibit warnings but also add AppAuth
and GTMAppAuth
as CocoaPod dependencies:
pod 'AppAuth', :inhibit_warnings => true
pod 'GTMAppAuth', :inhibit_warnings => true
If the SwiftPM feature is enabled, this caused duplicate modules and the build would fail.
This is a temporary workaround. In the future, we'll remove CocoaPod integration from these example apps. That's tracked by flutter/flutter#148021.
name: "google_sign_in_ios", | ||
platforms: [ | ||
.iOS("12.0"), | ||
.macOS("10.15") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bumped up to macOS 10.15. Required to depend on GoogleSignIn (here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already require 10.15 (which is good, because otherwise this would be very hard to roll out in a non-disruptive way).
], | ||
dependencies: [ | ||
// AppAuth and GTMSessionFetcher are GoogleSignIn transitive dependencies. | ||
// Depend on versions which define modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mirrors:
packages/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios.podspec
Lines 20 to 24 in 275e985
# AppAuth and GTMSessionFetcher are GoogleSignIn transitive dependencies. | |
# Depend on versions which defines modules. | |
s.dependency 'AppAuth', '>= 1.7.6' | |
s.dependency 'GTMSessionFetcher', '>= 3.4.0' | |
s.dependency 'GoogleSignIn', '~> 7.1' |
f36566e
to
eb4c0d5
Compare
From triage: still blocked on upstream issues. |
AppAuth-iOS 1.7.6 was released with the fix, this PR should be unblocked now: openid/AppAuth-iOS#871 |
cbaecfe
to
275e985
Compare
275e985
to
c2c83e2
Compare
a11e7df
to
687528d
Compare
This is failing Our options are to either allow packages to opt-out of warnings as errors, or, fix the warnings in the upstream dependency: openid/AppAuth-iOS#888 |
I'm okay with temporarily turning off warnings-as-errors for this package, but we should have a tracking issue with context for turning it back on. Ideally we should also reference an SPM feature request for the ability to do what we used to do with Cocoapods. Having the ability to use different warning settings for code you control and code you don't is a fairly common feature in build systems. |
Adds Swift Package Manager support to
google_sign_in_ios
.This does not migrate the example app's Xcode project to use Swift Package Manager, that's tracked by flutter/flutter#148021.
Fixes flutter/flutter#146904
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.